package salercomputer;

import salercomputer.CPU.AMD;
import salercomputer.CPU.CPU;
import salercomputer.CPU.inter;
import salercomputer.Disk.Disk;
import salercomputer.Disk.Seagate;

public class ComputerStore {
    public static void main(String[] args) {
        CPU intel = new inter("intel cpu",2.0,1000);
        Disk seagate =new Seagate("Seageak",1000.0,40960);

        //组装第一台机器并工作
        Computer computer1 = new Computer(intel, seagate, "computer 1");
        System.out.println("computer 1 description:"+computer1.description());
        System.out.println("computer 1 work :");
        computer1.work();
        //定义第二台计算机
        CPU amd = new AMD("AMD cpu",800.0,2);
        Disk westDigital =new Seagate("westDigital",1000.0,40960);
        Computer computer2 = new Computer(amd, westDigital, "computer 2");
        System.out.println("computer 2 description:"+computer1.description());
        System.out.println("computer 2 work !");
        computer2.work();
    }
}
